package ihm.models.events;

import java.util.EventObject;

import systems.database.query.Query;

/**
 * This event is use to notify that the query changed.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public class QueryChangedEvent
    extends EventObject {
  /**
   * Serial Version Value.
   */
  private static final long serialVersionUID = 1L;
  /**
   * The new query.
   */
  private Query query;
  /**
   * Create an event used to notify that the query has been changed
   * and the new query is given in parameter.
   * @param source - The source of this event.
   * @param newQuery - The new query.
   */
  public QueryChangedEvent(Object source, Query newQuery)
  {
    super(source);
    this.query = newQuery;
  }
  /**
   * Getter returning the new Query.
   * @return Query - The new Query.
   */
  public Query getQuery()
  {
    return this.query;
  }
}
